const gulp = require("gulp");
const autoprefixer = require("autoprefixer");
const cssnano = require("cssnano");
const atImport = require("postcss-import");

gulp.task("postcss", function () {
  const postcss = require("gulp-postcss");
  return gulp
    .src("src/02-use-autoprefoxer.css")
    .pipe(
      postcss([
        atImport,
        autoprefixer({
          overrideBrowserslist: [">0%"],
        }),
        cssnano,
      ])
    )
    .pipe(gulp.dest("build/postcss.css"));
});
